import instance from '../utils/request'

// 封装一个专门用来获取频道的接口
export const getChannels = () => {

  return instance({
    url: '/v1_0/user/channels',
  })
}
export const getAllChannels = () => {

  return instance({
    url: '/v1_0/channels',
    method: 'get'
  })
}
export const addChannels = (channels) => {

  return instance({
    url: '/v1_0/user/channels',
    method:'patch',
    data:{
      channels
    }
  })
}
export const delChannels = (id) => {

  return instance({
    url: `/v1_0/user/channels/${id}`,
    method:'DELETE',
  })
}